package managers.messengerManager.services;

import java.util.ResourceBundle;

import managers.messengerManager.FeedbackManager;
import managers.messengerManager.MessengerManager;


public class CheckServerConnectionService extends PeriodicService {

	private MessengerManager manager = MessengerManager.getSharedInstance();
	
	public CheckServerConnectionService(int timeoutPeriod) {
		super("CheckServerConnection", timeoutPeriod);
	}

	@Override
	public void run() {
		if (manager.getRecentFeedbackFromServer() == true)
			manager.setRecentFeedbackFromServer(false);
		else
			manager.getFeedbackManager().updateStatus(ResourceBundle.getBundle("managers.messengerManager.services.messages").getString("m.5"), FeedbackManager.WARNING);
	}

	
	
}
